package com.devinlee.designpatterns.decorator;

import com.devinlee.designpatterns.decorator.car.Car;
import com.devinlee.designpatterns.decorator.car.五菱宏光V1;
import com.devinlee.designpatterns.decorator.car.五菱宏光V2;

/**
 * 装饰者模式-测试
 */
public class Demo {

    public static void main(String[] args) {

        Car v1 = new 五菱宏光V1();
        v1.run();

        五菱宏光V2 v2 = new 五菱宏光V2(v1);
        v2.autoRun();
    }
}
